package com.summer.campussct.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 用户商户信息表，敏感信息可能会加密存储，因此设置为256个字符
 * </p>
 *
 * @author Mr.Chen
 * @since 2024-04-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 账户类型
     */
    @NotNull(message = "账户类型为空")
    private Integer type;

    private Long roleId;

    /**
     * 账户
     */
    @NotEmpty(message = "账户不能为空")
    private String account;

    /**
     * 1为启用0为禁用
     */
    private Integer status;

    /**
     * 昵称
     */
    @NotEmpty(message = "昵称不能为空")
    private String nickname;

    /**
     * 密码
     */
    @NotEmpty(message = "密码不能为空")
    private String password;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 微信号
     */
    private String wechat;

    /**
     * 所在位置
     */
    private String position;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;


}
